﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace UniRx
{
	// Token: 0x020003A4 RID: 932
	[Serializable]
	public struct Tuple<T1> : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable<Tuple<T1>>
	{
		// Token: 0x060012D2 RID: 4818 RVA: 0x000566CB File Offset: 0x00054ACB
		public Tuple(T1 item1)
		{
			this.item1 = item1;
		}

		// Token: 0x1700012D RID: 301
		// (get) Token: 0x060012D3 RID: 4819 RVA: 0x000566D4 File Offset: 0x00054AD4
		public T1 Item1
		{
			get
			{
				return this.item1;
			}
		}

		// Token: 0x060012D4 RID: 4820 RVA: 0x000566DC File Offset: 0x00054ADC
		int IComparable.CompareTo(object obj)
		{
			return ((IStructuralComparable)this).CompareTo(obj, Comparer<object>.Default);
		}

		// Token: 0x060012D5 RID: 4821 RVA: 0x000566F4 File Offset: 0x00054AF4
		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is Tuple<T1>))
			{
				throw new ArgumentException("other");
			}
			Tuple<T1> tuple = (Tuple<T1>)other;
			return comparer.Compare(this.item1, tuple.item1);
		}

		// Token: 0x060012D6 RID: 4822 RVA: 0x00056743 File Offset: 0x00054B43
		public override bool Equals(object obj)
		{
			return ((IStructuralEquatable)this).Equals(obj, EqualityComparer<object>.Default);
		}

		// Token: 0x060012D7 RID: 4823 RVA: 0x0005675C File Offset: 0x00054B5C
		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (!(other is Tuple<T1>))
			{
				return false;
			}
			Tuple<T1> tuple = (Tuple<T1>)other;
			return comparer.Equals(this.item1, tuple.item1);
		}

		// Token: 0x060012D8 RID: 4824 RVA: 0x0005679A File Offset: 0x00054B9A
		public override int GetHashCode()
		{
			return EqualityComparer<T1>.Default.GetHashCode(this.item1);
		}

		// Token: 0x060012D9 RID: 4825 RVA: 0x000567AC File Offset: 0x00054BAC
		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return comparer.GetHashCode(this.item1);
		}

		// Token: 0x060012DA RID: 4826 RVA: 0x000567BF File Offset: 0x00054BBF
		string ITuple.ToString()
		{
			return string.Format("{0}", this.item1);
		}

		// Token: 0x060012DB RID: 4827 RVA: 0x000567D6 File Offset: 0x00054BD6
		public override string ToString()
		{
			return "(" + ((ITuple)this).ToString() + ")";
		}

		// Token: 0x060012DC RID: 4828 RVA: 0x000567F7 File Offset: 0x00054BF7
		public bool Equals(Tuple<T1> other)
		{
			return EqualityComparer<T1>.Default.Equals(this.item1, other.item1);
		}

		// Token: 0x04000B48 RID: 2888
		private T1 item1;
	}
}
